package com.example.demo.photoFile.service;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Map;

/**
 * @Author: zjq
 * @Date: create in 2022/3/18 16:23
 */
public interface FileService {

    /**
     * 单张图片上传，大于5M会压缩
     * @param file
     * @param request
     * @return
     */
    Map<String, Object> uploadPhoto(MultipartFile file, HttpServletRequest request);

    /**
     * 多线程多张图片上传，大于5M会压缩
     * @param files
     * @param request
     * @return
     */
    Map<String, Object> uploadPhotos(MultipartFile[] files, HttpServletRequest request);

    /**
     * 压缩包上传图片
     * @param file
     * @param request
     * @return
     */
    Map<String, Object> uploadPhotoFile(MultipartFile file,HttpServletRequest request);
}
